# -*- coding: utf-8 -*-
from src.game.entity.projectile import EntityProjectile
from src.game.entity.living import EntityLiving

class EntityBullet(EntityProjectile):

    name = "entitybullet"

    def __init__(self):
        EntityProjectile.__init__(self)
        self.collision = True

    def onCollision(self, entity):
        EntityProjectile.onCollision(self, entity)
        if isinstance(entity, EntityLiving):
            entity.damage(1, EntityBullet.name, 2)